﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
   public class Magazines: Item
    {
       public Guid ID { get; set; }
       public string IssuNumber { get; set; }

       Dictionary<string, string> ItemFields { get; set; }
       Dictionary<string, string> MagazineFields { get; set; }

       Magazines() { }

       Magazines(string name, string publisher, DateTime publiseddate, string issuenumer)
           : this(Guid.Empty,name, publisher,publiseddate, issuenumer) { }

       Magazines(Guid id,string name, string publisher, DateTime publiseddate, string issuenumer)
       {
           this.ID = id;
           this.Publisher = publisher;
           this.PublishedDate = publiseddate;
           this.IssuNumber = issuenumer;


           ItemFields = new Dictionary<string, string>(3);
           ItemFields.Add("Name", Name);
           ItemFields.Add("Publisher", Publisher);
           ItemFields.Add("PublishedDate", PublishedDate.ToString());

           MagazineFields = new Dictionary<string, string>(1);
           MagazineFields.Add("IssueNumber",IssuNumber);
       }

           
    }
}
